package com.cmb.model;

import com.cmb.mybatis.mapper.BaseEntity;

import javax.persistence.Transient;

/**
 * Created by ycb on 2019/7/3.
 */
public class ElearnBaseEntity extends BaseEntity {

    @Transient
    private Integer iDisplayStart;
    @Transient
    private Integer iDisplayLength; //每页多少条
    @Transient
    private Integer page;//当前多少页

    public Integer getiDisplayStart() {
        return iDisplayStart;
    }

    public void setiDisplayStart(Integer iDisplayStart) {
        this.iDisplayStart = iDisplayStart;
        if(iDisplayStart!=null&&iDisplayLength!=null){
            page = this.iDisplayStart/iDisplayLength +1;
        }
    }

    public Integer getiDisplayLength() {
        return iDisplayLength;
    }

    public void setiDisplayLength(Integer iDisplayLength) {
        this.iDisplayLength = iDisplayLength;
        if(iDisplayStart!=null&&iDisplayLength!=null){
            page = iDisplayStart/iDisplayLength +1;
        }
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }
}
